{extend name="base/main" /}
{block name="body"}
    <div class="wrapper wrapper-content animated fadeInRight">
        <div class="ibox float-e-margins">
            <div class="ibox-title">
                <h5>分类管理 / 分类添加</h5>
            </div>
            <div class="ibox-content">
                <form id="f" action="{:url('Storeorder/toadd')}" class="form-horizontal m-t">
                    <div class="form-group">
                        <label class="col-sm-2 control-label">新闻名称：</label>
                        <div class="col-sm-4">
                            <input name="name" class="form-control" type="text" nullmsg="请输入新闻名称" errormsg="">
                            <span class="help-block m-b-none Validform_checktip" ><i class="fa fa-info-circle"></i></span>
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-sm-2 control-label">新闻简介：</label>
                        <div class="col-sm-4">
                            <input name="name" class="form-control" type="text" nullmsg="请输入新闻简介" errormsg="">
                            <span class="help-block m-b-none Validform_checktip" ></span>
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-sm-2 control-label">文章分类</label>
                        <div class="col-sm-4">
                          <select name="interest" lay-filter="aihao">
                            <option value=""></option>
                            <option value="0">写作</option>
                          </select>
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-sm-2 control-label">新闻排序：</label>
                        <div class="col-sm-4">
                            <input name="name" class="form-control" type="text" nullmsg="0" errormsg="">
                            <span class="help-block m-b-none Validform_checktip" ></span>
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-sm-2 control-label">新闻标签：</label>
                        <div class="col-sm-4">
                            <input name="name" class="form-control" type="text" nullmsg="最多4个字" errormsg="">
                            <span class="help-block m-b-none Validform_checktip" ></span>
                        </div>
                    </div>

                    <div class="layui-upload">
                        <button type="button" class="layui-btn" id="test1">新闻封面</button>
                        <div class="layui-upload-list">
                          <img class="layui-upload-img" id="demo1">
                          <p id="demoText"></p>
                        </div>
                        <div style="width: 95px;">
                          <div class="layui-progress layui-progress-big" lay-showpercent="yes" lay-filter="demo">
                            <div class="layui-progress-bar" lay-percent=""></div>
                          </div>
                        </div>
                    </div>

                    <textarea id="demo" style="display: none;"></textarea>

                    <div class="hr-line-dashed"></div>
                    <div class="form-group">
                        <div class="col-sm-4 col-sm-offset-3">
                            <input type="hidden" value="1">
                            <button class="btn btn-primary" type="submit">提交</button>
                            <button class="btn btn-default historygo" type="button">返回</button>
                        </div>
                    </div>
                </form>
            </div>
                
        </div>
    </div>
  
    <script>
        layui.use('layedit', function(){
        var layedit = layui.layedit;
        layedit.build('demo'); //建立编辑器
        });
    </script>

    <!-- <script type="text/javascript">
        function select_post(th) {
            var roleId = $(th).val();
            $.ajax({
                url :"{:url('AuthMember/rolePost')}",
                data:{role_id:roleId},
                type:'post',
                dataType:'json',
                success :function(ret) {
                    var html = '<option value="">请选择岗位</option>';
                    if( ret.code == 1 ) {
                        $.each(ret.data, function(key, val) {
                            html += '<option value="'+val.id+'">'+val.name+'</option>';
                        });
                    }
                    $('#post_id').html( html );
                    $('#post_id').removeClass('Validform_error');
                    $('#post_id').parent().find('.Validform_checktip').removeClass('Validform_wrong').removeClass('Validform_right').html('<i class="fa fa-info-circle"> 选择岗位</i>');
                }
            });
        }
    </script> -->
{/block}